<template>
    <div>
        <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="item in newsList" :key="item.id">
					<router-link :to="'/newsInfo/'+item.id">
						<img class="mui-media-object mui-pull-left" :src="item.img_url">
						<div class="mui-media-body">
							  {{item.title}}
                              <div class="redian">
                                  <span>左边{{item.add_time | datefmt('YYYY-MM-DD HH:mm:ss')}}</span>
                                  <span>右边{{item.click}}</span>
                              </div>
						</div>
					</router-link>
				</li>

			</ul>
    </div>
</template>
<script>
 export default{
    data(){
      return{
          newsList:[]
      }
    },
   methods: {
       initlist(){
           this.axios.get('/api/getnewslist').then(res=>{
                if(res.status === 200){
                    // console.log(res)
                    this.newsList = res.data.message
                }
           })
       }
   },
   created () {
     this.initlist();
   }
}
</script>
<style>
.mui-media-body{
    color:#000;
    font-size: 14px;
    font-weight: 700;

}
.mui-media-body .redian{
  display:flex;
   justify-content: space-between;
}
.mui-media-body .redian  span{
    font-size: 12px;
    font-weight: 200;
    color:green;
}
</style>
